

package com.hazelcast.instance.impl.executejar;

import com.hazelcast.instance.impl.BootstrappedJetProxy;
import com.hazelcast.jet.JetService;

import javax.annotation.Nonnull;

/**
 * This class' state holds {@link ExecuteJobParameters parameters} used by Jet jobs invoked via command line.
 */
public class CommandLineJetProxy<M> extends BootstrappedJetProxy<M> {

    private ExecuteJobParameters executeJobParameters;

    public CommandLineJetProxy(@Nonnull JetService jetService) {
        super(jetService);
    }

    @Override
    public boolean hasExecuteJobParameters() {
        return getExecuteJobParameters() != null;
    }

    @Override
    public ExecuteJobParameters getExecuteJobParameters() {
        return executeJobParameters;
    }

    @Override
    public void setExecuteJobParameters(ExecuteJobParameters executeJobParameters) {
        this.executeJobParameters = executeJobParameters;
    }
}
